#!/bin/sh

count=0

for arg in "$@"; do
    printf "#define\tinterface_%s\t\t%d\n" "$arg" "$count"
    count=`expr $count + 1`
done

printf "#ifdef USE_FUNCTABLE\n"

printf "#define MAX_PROF_TABLE %d\n" "$count"

printf "static char *func_table[] = {\n"

for arg in "$@"; do
    printf "\"%s\",\n" "$arg"
done

printf "};\n"
printf "#endif\n"

